package es.uclm.itsue.audio;
import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;

public class ItsueAudioActivity extends Activity {
	
	private MediaPlayer mp = null;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        if (mp != null) mp.release();
        mp = MediaPlayer.create(this, R.raw.melodia_de_fondo);
    	mp.setLooping(true);
    }        

    public void onPause() 
    { 
    	super.onPause();
    	mp.stop(); 
    } 
    
    public void onResume()
    { 
    	super.onResume();
    	mp.start();
    } 
}